<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="csrf-token" content="{{ csrf_token() }}">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">	
	<link rel="shortcut icon" type="image/x-icon" href="{{URL::asset('handan/images/logo-icon.png')}}" />
	<title>数据统计</title>
	<link rel="stylesheet" href="{{URL::asset('mobile/css/public.css') }}"/>
	<link rel="stylesheet" href="{{URL::asset('mobile/css/analystdata.css') }}"/>
	<script src="{{URL::asset('public_js/jquery-3.2.1.min.js')}}"></script>
	<script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts.js') }}"></script>
    <script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-3d.js')}}"></script>
    <script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-zh_CN.js')}}"></script>
    <script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/exporting.js') }}"></script>
    <script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/highcharts-more.js') }}"></script>
    <script src="{{ URL::asset('public_js/src/Highcharts-5.0.10/code/modules/solid-gauge.js') }}"></script>
	<script src="{{ URL::asset('public_js/src/echarts.js') }}"></script>
	<script src="{{URL::asset('mobile/js/public.js') }}"></script>
	<script src="{{URL::asset('mobile/js/analystdata.js') }}"></script>
</head>
<body>
	@if($memorderinfo)
		@foreach($memorderinfo as $key => $val)
	<!--顶部-->
	<section>
		<p><span>{{ round($val -> final_point,2)}}</span>点</p>
		<p>总盈利点数</p>
	</section>
	<!--盈利数据-->
	<section>
		<div class="single">
			<p>{{ round($val -> single_final_point,2)}}</p>
			<p>单均盈利</p>
		</div>
		<div class="line"></div>
		<div class="win">
			<p>{{ round($val -> winrate,2) }}%</p>
			<p>胜率</p>
		</div>
		<div class="line"></div>
		<div class="num">
			<p><span>{{ $val -> counts}}</span>笔</p>
			<p>策略数量</p>
		</div>
	</section>
	<!--数据详细列表-->
	<section>
		<div class="total">
			<p>
				<span>总盈利</span>
				<span>{{ $val -> wincounts}}笔</span>
			</p>
			<p>
				<span>总亏损</span>
				<span>{{ $val -> losscounts}}笔</span>
			</p>
		</div>
		<div class="total">
			<p>
				<span>做多盈利</span>
				<span>{{ $val -> buy_point}}点</span>
			</p>
			<p>
				<span>做空盈利</span>
				<span>{{ $val -> sell_point}}点</span>
			</p>
		</div>
		<div class="total">
			<p>
				<span>最大盈利</span>
				<span>{{ $val -> max_final_point}}点</span>
			</p>
			<p>
				<span>最大亏损</span>
				<span>{{ $val -> min_final_point}}点</span>
			</p>
		</div>
	</section>
		@endforeach
	@endif
	<!--交易品种   饼形图-->
	<div class="title">
		交易品种
	</div>
	<section>
		<div id="m_typechart" class="m_typechart" style="width: 100%;height: 7.5rem;"></div>
	</section>
	<!--擅长品种-->
	<div class="title">
		擅长品种
	</div>
	<section>
		@if($memadepttype)
			@foreach($memadepttype as $v) 
			<div>
				<p>{{$v -> chinaname}}</p>
				<p>{{$v -> typename}}</p>
				<p><span>{{$v -> ordernum}}</span>单</p>
				<p><span>{{$v -> point}}</span>点</p>
			</div>
			@endforeach
		@endif
	</section>
	<!--交易报表-->
	<div class="title">
		交易报表
	</div>
	<!--交易报表-->
	<section>
		<div class="m_jiaoyichart" id="m_jiaoyichart" style="width: 100%;height: 7.25rem;"></div>
	</section>
	<!--空白区-->
	<section></section>
</body>
</html>
<script>
	$(document).ready(function(){
		//交易品种
		var usertel = '{{ $info[0] -> tel }}';
	   	//交易品种饼图数据
	   	var dataP ="[{{$typenamestr}}]";
	   	dataP = dataP.replace(/&#039;/g,'"').replace(/&quot;/g,'"');
        dataP = $.parseJSON(dataP);
	   	drawChartB("m_typechart",dataP);
	   	//总交易报表
		var xmydata11 = [];
	    var xmypoint='{{ $pointDayJiaoyi }}';
	    var xmytime='{{ $timeDayJiaoyi }}';
	    xmytime = xmytime.split(',');
	    xmypoint = xmypoint.split(',');
	    xmypoint.forEach(function(data,index,arr){
	        xmydata11.push(+data);
	    });
	    jiaoyiChart(m_jiaoyichart,[xmytime,xmydata11]);
})
</script>
